export function showLoading(title: string = '请求中') {
    wx.showLoading({
        title,
        mask: false
    })
}

export function toastError(title: string) {
    showToast(title)
}

export function toastSuccess(title: string) {
    showToast(title, 'success')
}

export function showToast(title: string, icon: 'success' | 'loading' | 'none' = 'none', duration: number = 4000) {
    wx.showToast({
        icon,
        title: title || 'title',
        duration
    })
}